'use strict'

const { getHTML } = require('../lib/utils')

const spider = {}

spider.spider = async (ctx, next) => {
    const content = await getHTML(ctx.request.query.url)
    ctx.result = { content }
    return next()
}

module.exports = spider